<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>供应商报价</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="content-type" content="text/html;charset=utf-8">

<link rel="stylesheet" href="js/easyui/demo/demo.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/default/easyui.css" type="text/css"></link>
<script type="text/javascript" src="js/easyui/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui/themes/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="script/common.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">

<style type="text/css">
	.form-table {
		width:100%;
		padding: 20px 0px 20px 40px;
	}
	
	.form-table tr td {
		padding:5px;
	}
	
	.form-table tr td:first-child {
		width: 4em;
	}
	
</style>

<script type="text/javascript">
	/**
	 * 报价
	 */
	function suppQuote(){
		//var rowInfo = JSON.stringify(procureProduct);
		var wprice = $("#wprice").val();
		var wproductCode = $("#wproductCode").val();
		
		$.ajax({
			type:'POST',
			url:'pinquirysupplierQuote',
			data:{
				'wprice':wprice
			},
			dataType : 'json',
			success : function(data){
				if(data){
					$.messager.show({
						msg : '<div style="width:100%"><div style="line-height:50px;text-align:center;">'+wproductCode+' 报价成功！</div></div>',
						timeout : 800,
						showSpeed : 200,
						showType : 'show',
						style : {
							right : '',
							top : '',
							bottom : ''
						}
					});
				}
			}
		});
	}
	
	function onfocu() {
		$("#emsg").html("");
	}
</script>

<body>
	<div id="content" style="width: 100%;">
		<form action="" id="saveProductPartForm" method="post">
			<div id="contentOne" style="width: 500px;float: left;">
				<table class="form-table" cellspacing="0">
					<tr style="background-color: #f0c0c0;">
						<td>报价</td>
					 	<td> 
					 		<input class="easyui-textbox" id="wprice" prompt="报价" value="" 
					 		data-options="validType:['#validatePosNum'],required:true,missingMessage:'请输入报价'" style="width: 148px; height: 26px;">
					 	</td>
					 	<td colspan="2"></td>
					</tr>
					
					<tr style="background-color:  #f0f0f0;">
						<td>产品编码</td>
						<td>
							<input class="easyui-textbox" id="wproductCode" value="${proInquiry.procureProduct.productCode }" style="height: 26px;" disabled="disabled"/>
						</td>
						
						<td>采购数量</td>
						<td>
							<input class="easyui-textbox" value="${proInquiry.procureProduct.procCount }" style="height: 26px;" disabled="disabled"/>
						</td>
					</tr>
					
					<tr style="background-color: #f0f0f0;">
						<td>开始时间</td>
						<td>
							<input class="easyui-datebox" editable="false" value="${proInquiry.sendTime}" data-options="height:26,width:148" disabled="disabled"/>
						</td>
						
						<td style="width: 5em">结束时间</td>
						<td>
							<input class="easyui-datebox" editable="false" value="${proInquiry.endTime}" data-options="height:26,width:148" disabled="disabled"/>
						</td>
					</tr>
					
					<tr style="background-color: #f0f0f0;">
						<td>交付时间</td>
						<td>
							<input class="easyui-datebox" editable="false" value="${proInquiry.procureProduct.deliveryDate }" data-options="height:26,width:148" disabled="disabled"/>
						</td>
						<td colspan="2"></td>
					</tr>
					
				</table>
			</div>	
			<div id="contentTwo" style="width: 30%; float: left; margin: 30px 0px 0px 20px;">
				<img style="width: 120px; height: 120px;" id="partImage"  alt="" src="${proInquiry.procureProduct.blueprint }"  onerror="this.src='images/noPhoto.jpg'"></img>
			</div>
		</form>
		<div style="width: 85%;">
			<div style="float:left; width: 100%;margin-left:45px;">
				<table class="easyui-datagrid" style="width:600px;" rownumbers="true" id="partCrafs" url="pskugetProductSku">
					<thead>
						<tr>
							<th data-options="field:'skuCode'" align="center" width="180px;">产品SKU</th>
							<th data-options="field:'cona'" align="center" width="110px;">颜色</th>
							<th data-options="field:'szid'" align="center" width="110px;">尺寸</th>
							<th data-options="field:'purchaseNum'" align="center"  width="110px;">采购数量</th>
						</tr>
					</thead>
				</table>
				
				<div style="float: left; padding:20px 0px 0px 200px;">
					<a class="easyui-linkbutton" onclick="removeCurrentPanel();" style="margin-left: 10px;">返回</a>
					<a onclick="suppQuote()" class="easyui-linkbutton" style="margin-left: 10px;padding: 0px 3px;">提交</a>
				</div>
				
			</div>
		</div>
	</div>
</body>
</html>